import request from '@/utils/request'

// 查询入库记录列表
export function listIninfo(query) {
  return request({
    url: '/ewem/ininfo/list',
    method: 'get',
    params: query
  })
}

// 查询入库记录详细
export function getIninfo(ininfoId) {
  return request({
    url: '/ewem/ininfo/' + ininfoId,
    method: 'get'
  })
}

// 签收
export function stockIn(data) {
  return request({
    url: '/ewem/ininfo/stockIn',
    method: 'put',
    data: data
  })
}

// 新增入库记录
export function addIninfo(data) {
  return request({
    url: '/ewem/ininfo',
    method: 'post',
    data: data
  })
}

// 修改入库记录
export function updateIninfo(data) {
  return request({
    url: '/ewem/ininfo',
    method: 'put',
    data: data
  })
}

// 删除入库记录
export function delIninfo(ininfoId) {
  return request({
    url: '/ewem/ininfo/' + ininfoId,
    method: 'delete'
  })
}
